<template>
  <div>
    <div class="wrapper">
      <nav>
        <RouterLink to="/">RENDER DEMO</RouterLink>
        <RouterLink to="/render/simple">SIMPLE RENDER</RouterLink>
        <RouterLink to="/render/submit">SUBMIT RENDER</RouterLink>
        <RouterLink to="/render/pdf">PDF RENDER</RouterLink>
        <RouterLink to="/render/wizard">WIZARD RENDER</RouterLink>
        <RouterLink to="/render/wizard/custom">CUSTOM WIZARD RENDER</RouterLink>
        <RouterLink to="/render/editor">富文本编辑</RouterLink>
        <RouterLink to="/render/json">JSON POWERED</RouterLink>
        <RouterLink to="/render/logic">字段逻辑控制</RouterLink>
        <RouterLink to="/render/datagrid">表格展示</RouterLink>
        <RouterLink to="/render/skr">自定义组件-收款人</RouterLink>
        <RouterLink to="/builder">Builder DEMO</RouterLink>
        <RouterLink to="/demo1">demo1</RouterLink>
        <RouterLink to="/demo2">demo2</RouterLink>
        <RouterLink to="/jsoneditor">json-editor</RouterLink>
      </nav>
    </div>
    <RouterView />
  </div>
</template>
<script setup lang="ts">
import i18next from 'i18next';
import {onMounted} from "vue";

i18next.init({
  lng: 'en', // if you're using a language detector, do not define the lng option
  debug: true,
  resources: {
    en: {
      translation: {
        "key": "hello world {{ name }}"
      }
    }
  }
});

onMounted(() => {
  let tn = i18next.t('key', {
    name : 'ddshuai'
  });

  console.log(tn,"翻译的内容");
})
</script>
<style scoped>
nav {
  width: 100%;
  font-size: 12px;
  text-align: left;
  margin-top: 10px;
}

nav a.router-link-exact-active {
  color: var(--color-text);
}

nav a.router-link-exact-active:hover {
  background-color: transparent;
}

nav a {
  display: inline-block;
  padding: 0 1rem;
  border-left: 1px solid var(--color-border);
}

nav a:first-of-type {
  border: 0;
}
</style>
